Skip to content

Conversation

@phrawzty
Copy link
Collaborator

@phrawzty phrawzty commented Nov 10, 2025

The pattern matching in change_sponsor_logo.sh script wasn't precise enough, resulting in errant (greedy) behaviour (example: #15572 (comment)).

I think this is all we need to do to tighten it up. By moving the $ from the brackets and to the end of the regex, we will nab only the string literal, not any substrings.

@phrawzty phrawzty requested a review from a team as a code owner November 10, 2025 15:50
@netlify
Copy link

netlify bot commented Nov 10, 2025

Deploy Preview for devopsdays-web ready!

Name Link
🔨 Latest commit cb83238
🔍 Latest deploy log https://app.netlify.com/projects/devopsdays-web/deploys/691209d905266200085b1753
😎 Deploy Preview https://deploy-preview-15575--devopsdays-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@phrawzty
Copy link
Collaborator Author

I tested this a on a few different strings and it worked as expected. I only tested on a modern macbook however, so I'm not sure how things would go on e.g. Linux.

Copilot finished reviewing on behalf of mattstratton November 11, 2025 15:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a regex pattern matching bug in the change_sponsor_logo.sh script that was causing greedy/errant behavior when matching sponsor IDs in event files.

Key changes:

  • Updated the SPONSOR_REGEX pattern to properly match end-of-line by moving the $ anchor outside the character class

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mattstratton mattstratton merged commit 9a9d244 into devopsdays:main Nov 11, 2025
16 checks passed
@phrawzty phrawzty deleted the fix_greedy_logo_script branch November 12, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants